package com.achievo.know.application;

import java.util.Date;
import java.util.List;

import com.achievo.know.domain.News;
import com.achievo.know.domain.UserFavorite;
import com.achievo.know.pojo.SearchParam;
import com.dayatang.querychannel.support.Page;

public interface NewsApplication {

	/**
	 * 分页查询列表
	 * @param params 
	 * @return
	 */
	public Page<News> queryPage(List<Long> cateIds,int currentPage,int pageSize, SearchParam params, boolean isSuper);
	
	public void add(News news);

	public News get(Long id);

	public void remove(News n);

	public void batchDelete(String[] idArr);

	public News showNews(long newsId, boolean add);

	public void edit(News n);

	public News showEditNews(long newsId, String tempFileId, String tempImageId);

	public void changePosition(News onew, News dnew);

	public void setSugest(String[] idArr, Date sugestDate);

	public Long getLid(Long areaId, Long id);

	public Long getRid(Long areaId, Long id);

	public Long getTop(Long areaId);

	public void updateNews(News onew);

	public Long getLid(Long id);

	public Long getRid(Long id);

	public Long getTop();

	public void beforePosition(News onew, String ids);

	public void addFavorite(UserFavorite uf, String userId);

	public Page<News> queryMyFavorite(String userId, int currentPage,
			int pageSize);

	public void batchDeleteFavorite(String[] idArr);
	
}
